from enum import Enum
from mlagents_envs.exception import UnityCommunicationException
from mlagents_envs.side_channel.side_channel import (
    SideChannel,
    IncomingMessage,
    OutgoingMessage,
)
import uuid

class EnvironmentStateChannel(SideChannel):

    def __init__(self) -> None:
        super().__init__(uuid.UUID("621f0a70-4f87-11ea-a6bf-784f4387d1f9"))
        self.done = False

    def on_message_received(self, msg: IncomingMessage) -> None:
        self.done = msg.read_bool()